Draft Rotate/ru

Повернуть

Расположение в меню
Модификация → Повернуть
Верстаки
Draft, Arch
Быстрые клавиши
R O
Представлено в версии
0.7
См. также
Draft SubelementHighlight

Описание

The Draft Rotate command rotates or copies selected objects around a center point by a given angle. The axis of rotation is perpendicular to the current working plane and the rotation angle is relative to that plane. In subelement mode the command rotates selected points and edges, or copies selected edges, of Draft Lines and Draft Wires.

Команду можно использовать на 2D-объектах, созданных в верстаке Draft или верстаке Sketcher, а также на многих 3D-объектах, созданных с помощью верстака Part, верстака PartDesign и верстака Arch.

Rotating an object around a center point

Применение

See also: Draft Snap and Draft Constrain.

  1. Optionally select one or more objects, or one or more subelements of Draft Lines or Draft Wires.
  2. There are several ways to invoke the command:
    • Press the Rotate button.
    • Draft: Select the Modification → Rotate option from the menu.
    • BIM: Select the Modify → Rotate option from the menu.
    • Use the keyboard shortcut: R then O.
  3. If you have not yet selected an object: select an object in the 3D view.
  4. The Rotate task panel opens. See Options for more information.
  5. If subelements have been selected: check the Modify subelements checkbox to switch on subelement mode.
  6. Pick the first point, the center of rotation, in the 3D view, or type coordinates and press the Enter point button.
  7. Pick the second point in the 3D view, or enter a Base angle.
  8. Pick the third point in the 3D view, or enter a Rotation.

Options

The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts (for version 1.0).

Примечания

Настройки

See also: Preferences Editor and Draft Preferences.

Программирование

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To rotate objects use the rotate method of the Draft module.

rotated_list = rotate(objectslist, angle, center=Vector(0,0,0), axis=Vector(0,0,1), copy=False)

Пример:

import FreeCAD as App
import Draft

doc = App.newDocument()

polygon1 = Draft.make_polygon(3, radius=300)
Draft.move(polygon1, App.Vector(1000, 0, 0))

# Rotation around the origin
angle1 = 45
rot2 = Draft.rotate(polygon1, angle1, copy=True)
rot3 = Draft.rotate(polygon1, 2*angle1, copy=True)
rot4 = Draft.rotate(polygon1, 4*angle1, copy=True)

polygon2 = Draft.make_polygon(3, radius=1000)
polygon3 = Draft.make_polygon(5, radius=500)
Draft.move(polygon2, App.Vector(2000, 0, 0))
Draft.move(polygon3, App.Vector(2000, 0, 0))

# Rotation around another point
angle2 = 60
cen = App.Vector(3100, 0, 0)
list2 = [polygon2, polygon3]
rot_list2 = Draft.rotate(list2, angle2, center=cen, copy=True)
rot_list3 = Draft.rotate(list2, 2*angle2, center=cen, copy=True)
rot_list4 = Draft.rotate(list2, 4*angle2, center=cen, copy=True)

doc.recompute()